<div id="controls">
	<ul>
		<li><%= link_to 'Blog', :controller => 'blog', :action => 'index' %></li>
		<li><%= link_to 'Wiki', :action => 'index' %></li>
		<% if session[:user] -%>
			<% if params[:action] == 'index' -%>
			<li>
				<%= link_to_remote "Add A Post " + image_tag('ispinner.gif', 
					:size => '16x16', 
					:alt => "Please wait...", 
					:style => 'display: none', 
					:id => 'add_post_indicator', 
					:class => 'middle'),
					{
						:loading => "$('add_post_indicator').show()",
						:complete => "$('add_post_indicator').hide()",
						:url => { :action => :remote_show_new }
					},
					{
						:href => url_for(:action => :new),
						:id => 'add_post'
					}
				%>
				</li>
			<% end -%>
			<li>
			<%= link_to 'Sign out', :controller => 'user', :action => 'signout' %>
			</li>
		<% else -%>
			<li><%= link_to 'Sign in', :controller => 'user', :action => 'signin' %></li>
		<% end -%>
	</ul>

	<div class="clear">&nbsp;</div>
</div>